package com.atguigu.proxy.jt;

/**
 * Date:2020/9/24
 * Author:ybc
 * Description:
 */
public class ProxyObject implements MathI {

    private MathImpl mathImpl;

    public ProxyObject(MathImpl mathImpl) {
        this.mathImpl = mathImpl;
    }

    @Override
    public int add(int a, int b) {
        System.out.println("方法：add，参数："+a+","+b);
        int result = mathImpl.add(a, b);
        System.out.println("结果："+result);
        return result;
    }

    @Override
    public int sub(int a, int b) {
        return 0;
    }

    @Override
    public int multi(int a, int b) {
        return 0;
    }

    @Override
    public int div(int a, int b) {
        return 0;
    }
}
